
Here a simple example of a library file (``mylib.sh``):

.. code-block:: bash

	# lib variables
	MCOUNT='counting'
	MDONE='done'

	# lib function
	loop () {
		local i
		i=0
		echo -n "$MCOUNT:"
		while [ $i -le $1 ]; do
			echo -n "$i,"
			i=$(($i+1))
		done
		echo "$MDONE!"
	}

and a shell script where it is imported:

.. code-block:: bash

	#!/bin/sh
	. libinclude.sh
	import mylib

	# counting...
	mylib_loop 10

	# and 'en francaise'...
	mylib_MCOUNT='compter'
	mylib_MDONE='fini'
	mylib_loop 3

which will return::

	counting:0,1,2,3,4,5,6,7,8,9,10,done!
	compter:0,1,2,3,fini!
	
